:global {
  .ruler-container {
    width: 100%;
    padding: 10px 0;
    user-select: none;
  }

  .ruler {
    position: relative;
    height: 40px;
    width: 100%;
    cursor: pointer;
    scrollbar-width: none;
    /* 隐藏滚动条 */
  }

  .ruler::-webkit-scrollbar {
    display: none;
  }

  .ruler-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ebeef5;
    transform: translateY(-50%);
  }

  .ruler-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    transform: translateY(-50%);
    transition: width 0.2s;
  }

  .ruler-tick {
    position: absolute;
    bottom: 50%;
    width: 1px;
    background-color: #c0c4cc;
    transform: translateX(-50%);

    canvas {
      position: absolute;
      top: 0;
      left: 0;
      transform: translateY(60px);
      width: 50px;
      height: 50px;
    }
  }

  .ruler-tick.major-tick {
    background-color: #909399;
  }

  .tick-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #909399;
    margin-top: 4px;
  }

  .ruler-indicator {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    cursor: grab;
  }

  .ruler-indicator:active {
    cursor: grabbing;
  }

  .range-control {
    position: relative;
    height: 30px;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;

    .range-track {
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 4px;
      background-color: #ebeef5;
      transform: translateY(-50%);
    }

    .range-handle {
      position: absolute;
      top: 50%;
      width: 12px;
      height: 20px;
      background-color: #409eff;
      border-radius: 4px;
      transform: translate(-50%, -50%);
      cursor: ew-resize;
      z-index: 2;

      &-start {
        left: 0;
      }

      &-end {
        left: 100%;
      }
    }

    .range-area {
      position: absolute;
      top: 0;
      height: 100%;
      background-color: rgba(64, 158, 255, 0.1);
      cursor: move;
    }

    .range-reset {
      position: absolute;
      right: -60px;
      top: 50%;
    }
  }
}